package com.zz.parkingsystem.entity;

import java.io.Serializable;
import lombok.Data;

/**
 * 路段表
 * @TableName t_section
 */
@Data
public class Section implements Serializable {
    /**
     * 路段id
     */
    private Integer secId;

    /**
     * 巡查员id
     */
    private Integer insId;

    /**
     * 策略id
     */
    private Integer stagyId;

    /**
     * 路段名称
     */
    private String secName;

    /**
     * 路段code
     */
    private Integer secCode;

    /**
     * 车位数量
     */
    private Integer secSpaceCount;

    /**
     * 路段所属地区
     */
    private String reservedVar;

    /**
     * 预留int字段
     */
    private Integer reservedInt;

    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Section other = (Section) that;
        return (this.getSecId() == null ? other.getSecId() == null : this.getSecId().equals(other.getSecId()))
            && (this.getInsId() == null ? other.getInsId() == null : this.getInsId().equals(other.getInsId()))
            && (this.getStagyId() == null ? other.getStagyId() == null : this.getStagyId().equals(other.getStagyId()))
            && (this.getSecName() == null ? other.getSecName() == null : this.getSecName().equals(other.getSecName()))
            && (this.getSecCode() == null ? other.getSecCode() == null : this.getSecCode().equals(other.getSecCode()))
            && (this.getSecSpaceCount() == null ? other.getSecSpaceCount() == null : this.getSecSpaceCount().equals(other.getSecSpaceCount()))
            && (this.getReservedVar() == null ? other.getReservedVar() == null : this.getReservedVar().equals(other.getReservedVar()))
            && (this.getReservedInt() == null ? other.getReservedInt() == null : this.getReservedInt().equals(other.getReservedInt()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getSecId() == null) ? 0 : getSecId().hashCode());
        result = prime * result + ((getInsId() == null) ? 0 : getInsId().hashCode());
        result = prime * result + ((getStagyId() == null) ? 0 : getStagyId().hashCode());
        result = prime * result + ((getSecName() == null) ? 0 : getSecName().hashCode());
        result = prime * result + ((getSecCode() == null) ? 0 : getSecCode().hashCode());
        result = prime * result + ((getSecSpaceCount() == null) ? 0 : getSecSpaceCount().hashCode());
        result = prime * result + ((getReservedVar() == null) ? 0 : getReservedVar().hashCode());
        result = prime * result + ((getReservedInt() == null) ? 0 : getReservedInt().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", secId=").append(secId);
        sb.append(", insId=").append(insId);
        sb.append(", stagyId=").append(stagyId);
        sb.append(", secName=").append(secName);
        sb.append(", secCode=").append(secCode);
        sb.append(", secSpaceCount=").append(secSpaceCount);
        sb.append(", reservedVar=").append(reservedVar);
        sb.append(", reservedInt=").append(reservedInt);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}